import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        params
    })
}
//查询活动订单
export function orderList(query) {
    return request({
      url: '/shenye/asset/package/order/list',
      method: 'get',
      params: query
    })
  }

// 查询神椰资产包活动列表
export function packageList(query) {
  return request({
    url: '/shenye/asset/package/list',
    method: 'get',
    params: query
  })
}
// 查询店铺下拉框
export function shenyemerchant() {
    return request({
      url: '/shenye/asset/package/shop/select',
      method: 'get',
    })
}
// 查询发行方下拉框
export function issuerSelect() {
    return request({
      url: '/shenye/asset/package/issuer/select',
      method: 'get',
    })
}

//查询店铺活动资产下拉框
export function shopasset(params) {
    return request({
      url: '/shenye/asset/package/shop/card/select',
      method: 'get',
      params: params
    })
}
//查询店铺活动资产卡信息
export function assetInfo(id) {
    return request({
      url: `/shenye/asset/package/shop/card/${id}`,
      method: 'get',
    })
}
//查询神椰资产包详情
export function packageInfo(id) {
    return request({
      url: `/shenye/asset/package/detail/${id}`,
      method: 'get',
    })
}
//查询勋章卡下拉框
export function xzAsset() {
    return request({
      url: '/shenye/asset/package/medal/card/select',
      method: 'get',
    })
}
//查询勋章卡信息
export function xzAssetInfo(id) {
    return request({
      url: `/shenye/asset/package/medal/card/${id}`,
      method: 'get',
    })
}


// 新增神椰资产包活动
export function addPackage(data) {
  return request({
    url: '/shenye/asset/package', 
    method: 'post',
    data: data
  })
}
// 神椰广告配置详情
export function advertisementInfo(id) {
  return request({
    url: `/shenye/advertisement/config/detail/${id}`,
    method: 'get'
  })
}
// 编辑神椰资产包活动
export function editPackage(data) {
  return request({
    url: '/shenye/asset/package',
    method: 'put',
    data: data
  })
}



//神椰广告配置删除
export function advertisementDelete(id) {
  return request({
      url: `/shenye/advertisement/config/${id}`,
      method: 'DELETE',
  })
}
//神椰广告配置 轮播图跳转下拉
export function bannerSelect(data) {
  return request({
    url: `/shenye/advertisement/config/banner/select`,
    method: 'get',
    params: data
  })
}